home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / TIME.PAK / TIMEPPG.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  3KB  |  92 lines

  1. // timeppg.cpp : Implementation of the CTimePropPage property page class.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. #include "stdafx.h"
  15. #ifdef __BORLANDC__
  16. #include "temptime.h"
  17. #else
  18. #include "time.h"
  19. #endif
  20. #include "timeppg.h"
  21.  
  22. #ifdef _DEBUG
  23. #undef THIS_FILE
  24. static char BASED_CODE THIS_FILE[] = __FILE__;
  25. #endif
  26.  
  27.  
  28. IMPLEMENT_DYNCREATE(CTimePropPage, COlePropertyPage)
  29.  
  30.  
  31. /////////////////////////////////////////////////////////////////////////////
  32. // Message map
  33.  
  34. BEGIN_MESSAGE_MAP(CTimePropPage, COlePropertyPage)
  35.     //{{AFX_MSG_MAP(CTimePropPage)
  36.     //}}AFX_MSG_MAP
  37. END_MESSAGE_MAP()
  38.  
  39.  
  40. /////////////////////////////////////////////////////////////////////////////
  41. // Initialize class factory and guid
  42.  
  43. IMPLEMENT_OLECREATE_EX(CTimePropPage, "TIME.TimePropPage.1",
  44.     0x37446b93, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
  45.  
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CTimePropPage::CTimePropPageFactory::UpdateRegistry -
  49. // Adds or removes system registry entries for CTimePropPage
  50.  
  51. BOOL CTimePropPage::CTimePropPageFactory::UpdateRegistry(BOOL bRegister)
  52. {
  53.     if (bRegister)
  54.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  55.             m_clsid, IDS_TIME_PPG);
  56.     else
  57.         return AfxOleUnregisterClass(m_clsid, NULL);
  58. }
  59.  
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CTimePropPage::CTimePropPage - Constructor
  63.  
  64. CTimePropPage::CTimePropPage() :
  65.     COlePropertyPage(IDD, IDS_TIME_PPG_CAPTION)
  66. {
  67.     //{{AFX_DATA_INIT(CTimePropPage)
  68.     m_Enabled = FALSE;
  69.     m_Interval = 0;
  70.     //}}AFX_DATA_INIT
  71. }
  72.  
  73.  
  74. /////////////////////////////////////////////////////////////////////////////
  75. // CTimePropPage::DoDataExchange - Moves data between page and properties
  76.  
  77. void CTimePropPage::DoDataExchange(CDataExchange* pDX)
  78. {
  79.     //{{AFX_DATA_MAP(CTimePropPage)
  80.     DDP_Check(pDX, IDC_ENABLEDCHECK, m_Enabled, _T("Enabled"));
  81.     DDX_Check(pDX, IDC_ENABLEDCHECK, m_Enabled);
  82.     DDP_Text(pDX, IDC_INTERVALEDIT, m_Interval, _T("Interval"));
  83.     DDX_Text(pDX, IDC_INTERVALEDIT, m_Interval);
  84.     DDV_MinMaxInt(pDX, m_Interval, 1, 32767);
  85.     //}}AFX_DATA_MAP
  86.     DDP_PostProcessing(pDX);
  87. }
  88.  
  89.  
  90. /////////////////////////////////////////////////////////////////////////////
  91. // CTimePropPage message handlers
  92.